1. Field of the Disclosure
The present disclosure relates to a system and a method for setting offset and gain of analog input module. More specifically, the present disclosure relates to a system for setting offset and gain of an analog input module, by concurrently reading and storing offset and gain using a pulse wave form.
2. Discussion of the Related Art
A factory system was conventionally operated by controlling a machine or a device singularly. However, as modern industries are increasingly varied and complicated, the change of system is required. That is, a device to safely operate important equipment of a complex system is required. Thus, a programmable logic controller (PLC) to directly control manufacturing lines has been developed.
The PLC is an electronic device to control various kinds of machines or processors by using a programmable memory. The PLC performs specialized functions such as logic, counting, sequencing, timing, counting, and calculating through a digital or analog input and output module.
In general, the PLC functions as a computer. The PLC receives signals from the machines, processes as programmed, and outputs the processed signals to the machines.
The PLC substitutes the controller functions such as relay, timer, and counter to semiconductor elements such as integrated devices and transistors, and may be applied to various operations such as device control, device value setting, real-time surveillance, real-time data collection, and driving safety devices.
The PLC includes an analog output module (digital-analog conversion module) to provide signals to the machines such as automation equipment, and an analog input module (analog-digital conversion module) to receive inputs from the machines.
The analog input module converts an analog signal provided from the machines to a digital signal and provides the digital signal to an internal execution processing unit. The analog output module receives a digital signal reflecting the execution processing result from the execution processing unit, converts the digital signal to an analog signal, and transmits the analog signal to the machines.
The analog input module included in the PLC detects various analog signals such as a predetermined pressure, flux, and temperature using a sensor such as a transducer while driving a load. The analog input module inputs and converts the detected analog signal to a digital signal, and outputs the digital signal to a PLC execution unit.
The analog input module measures a variety of electrical signals such as direct voltage in a range of 1V˜5V, 0V˜5V, 0V˜10V, or −10V˜10V, or alternating currents in a range of 0 mA˜20 mA, or 4 mA˜20 mA.
Therefore, it is required to set an offset and a gain to correct an input module circuit and to construct a system therefor, in order to precisely measure such values.
In a conventional art, offsets and gains are set by a method of inputting offset values in an order of channels according to input range of the analog input module and storing the offset values, and afterwards, inputting gain values and storing the gain values. This method has a problem of consuming a large amount of setting time.